package edu.gu.hajo.gcl.cmd.impl;

import java.util.ArrayList;
import java.util.List;

import edu.gu.hajo.gcl.cmd.IMutableCommand;
import edu.gu.hajo.gcl.interp.IInterpreter;

/**
 * Baseclass for all commands (common code refactored)
 * @author hajo
 *
 */
public abstract class AbstractCmd implements IMutableCommand {
	
	protected IInterpreter interp;
	
	public AbstractCmd( IInterpreter interp ){
		this.interp = interp;
	}
	
	protected List<String> args = new ArrayList<String>();

	/* (non-Javadoc)
	 * @see edu.gu.hajo.gcl.cmd.impl.IMutableCommand#set(java.util.List)
	 */
	public void set(List<String> words) {
		args = words;
	}
	
	public abstract void execute();
}
